/* codeml_leo.h
*/

#ifndef CODEML_RESULTS_H
#define CODEML_RESULTS_H

#include <vector>
#include <string>
#include <iostream>

struct t_codeml_results
{
	unsigned	seq_tag1;
	unsigned	seq_tag2;
	double		N;
	double		S;
	double		dN;
	double		dS;
	double		dN_dS;
	double		lnL;
	double		std_err_dN;
	double		std_err_dS;
	double		kappa;
	double		dT;
	std::string	error_str;
	static std::string		comma_delimited_fields();
	static std::string		column_names();
	static std::string		column_name_underscores();
	t_codeml_results(){}
	t_codeml_results(	unsigned	seq_tag1_,
						unsigned	seq_tag2_,
						const std::string	error_str_):
						seq_tag1(seq_tag1_),
						seq_tag2(seq_tag2_),
						N(0.0),
						S(0.0),
						dN(0.0),
						dS(0.0),
						dN_dS(0.0),
						lnL(0.0),
						std_err_dN(0.0),
						std_err_dS(0.0),
						kappa(0.0),
						dT(0.0),
						error_str(error_str_){}

	t_codeml_results(	unsigned			seq_tag1_,
						unsigned			seq_tag2_,
						double				N_,
						double				S_,
						double				dN_,
						double				dS_,
						double				dN_dS_,
						double				lnL_,
						const std::string	error_str_	= std::string(),
						double				std_err_dN_	= 0.0,
						double				std_err_dS_	= 0.0,
						double				kappa_		= 0.0,
						double				dT_ 		= 0.0):
						seq_tag1(seq_tag1_),
						seq_tag2(seq_tag2_),
						N(N_),
						S(S_),
						dN(dN_),
						dS(dS_),
						dN_dS(dN_dS_),
						lnL(lnL_),
						std_err_dN(std_err_dN_),
						std_err_dS(std_err_dS_),
						kappa(kappa_),
						dT(dT_),
						error_str(error_str_){}
};

std::ostream& operator <<(std::ostream& strm, const t_codeml_results& res);
std::istream& operator >> (std::istream& istrm, t_codeml_results& results);
#endif //CODEML_RESULTS_H
